package com.markerhub.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.markerhub.entity.InspectionTask;
import com.markerhub.mapper.InspectionTaskMapper;
import com.markerhub.service.InspectionTaskService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

/**
 * 巡检任务服务实现类
 */
@Service
public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper, InspectionTask> implements InspectionTaskService {

    @Override
    public List<Map<String, Object>> getTaskListWithDevice(String taskName, Integer status, long offset, long limit) {
        return baseMapper.selectTaskListWithDevice(taskName, status, offset, limit);
    }

    @Override
    public long getTaskCountWithDevice(String taskName, Integer status) {
        return baseMapper.selectTaskCountWithDevice(taskName, status);
    }

    @Override
    public Map<String, Object> getTaskByIdWithDevice(Long id) {
        return baseMapper.selectTaskByIdWithDevice(id);
    }
}